<template>
  <div>
    <div style="background: #e8f1f8">
      <div class="det_tab">
        <div class="det_tab_item">
          <eagle-cell-group :border="border">
          
            <eagle-input
              :value="form.CheckDay"
              label="最近复审日期"
              rows="1"
              autosize
              readonly
            ></eagle-input>
    
            <eagle-input
              :value="form.NextCheckDay"
              label="下次复审日期"
              rows="1"
              autosize
              readonly
            ></eagle-input>
          </eagle-cell-group>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { getDate } from "@/utils/getDate";
// import { deepClone } from "@/utils";
export default {
  components: {},
  data() {
    return {
      baseUrl: process.env.VUE_APP_BASE_API,
      id: this.$route.query.id,
      border: false,
      form: {},
      total: 0,
      show: false,
      PlanTypeName: "无",
    };
  },
  created() {
    this.geDetail();
    console.log("created");
  },
  activated() {
    console.log("activated");
  },
  methods: {
    // 获取详情
    geDetail() {
      let _this = this;
      _this.$axios
        .get("/SiteCertCheckHis/GetDetail", { params: { id: this.id } })
        .then((res) => {
          _this.form = res.data;
          _this.form.EffectDate = getDate(res.data.EffectDate);
          //比较预案类型 获取 类型名称
          if (res.data.PlanTypeList && res.data.PlanTypeList.length > 0) {
            res.data.PlanTypeList.forEach((element) => {
              if( element.ID == res.data.PlanType){
                _this.PlanTypeName = element.Name ;
              }
              
            });
          }
        });
    },
  },
};
</script>f

<style lang="less">

</style>
